<?php

namespace backend\modules\trancfg\models;

use Yii;
use yii\db\ActiveRecord;
/**
 * This is the model class for table "pubtrandict".
 *
 * @property string $MTID
 * @property string $ROUTEID
 * @property string $IOFLAG
 * @property integer $SEQNO
 * @property string $DICTCODE
 * @property string $DICTTYPE
 * @property integer $DICTLEN
 * @property integer $DECLEN
 * @property string $DICTNAME
 * @property string $FLAG
 * @property string $SUBMARK
 * @property string $SUBCOND
 * @property string $FIELD
 * @property string $PATH
 * @property string $DEFVAL
 * @property string $DEALFUNC
 * @property string $MEMO
 */
class Pubtrandict extends ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'pubtrandict';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['SEQNO'], 'required'],
            [['SEQNO', 'DICTLEN', 'DECLEN'], 'integer'],
            [['MTID'], 'string', 'max' => 6],
            [['ROUTEID', 'SUBMARK'], 'string', 'max' => 2],
            [['IOFLAG', 'DICTTYPE', 'FLAG'], 'string', 'max' => 1],
            [['DICTCODE', 'DEALFUNC'], 'string', 'max' => 32],
            [['DICTNAME', 'FIELD'], 'string', 'max' => 40],
            [['SUBCOND', 'DEFVAL', 'MEMO'], 'string', 'max' => 60],
            [['PATH'], 'string', 'max' => 100]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'MTID' => Yii::t('app', '报文码'),
            'ROUTEID' => Yii::t('app', '路由编号'),
            'IOFLAG' => Yii::t('app', 'I/O'),
            'SEQNO' => Yii::t('app', '序号'),
            'DICTCODE' => Yii::t('app', '字典码'),
            'DICTTYPE' => Yii::t('app', '类型'),
            'DICTLEN' => Yii::t('app', '长度'),
            'DECLEN' => Yii::t('app', '小数位'),
            'DICTNAME' => Yii::t('app', '名称'),
            'FLAG' => Yii::t('app', '标志'),
            'SUBMARK' => Yii::t('app', '组件标志'),
            'SUBCOND' => Yii::t('app', '取值条件'),
            'FIELD' => Yii::t('app', '栏位名称'),
            'PATH' => Yii::t('app', '路径'),
            'DEFVAL' => Yii::t('app', '字段初值'),
            'DEALFUNC' => Yii::t('app', '转换函数'),
            'MEMO' => Yii::t('app', '循环层'),
        ];
    }
}
